const crosscom = require("../");
const cc = crosscom(require("child_process").fork(__dirname + "/subprocess.js"));
var a= (err, data, {type, response} = {}) => {
		console.log("response", data, type);
		return response(3, "response", b);
	},
	b = (err, data, {type, response} = {}) => {
		console.log("response", data, type);
		return response(5, "response", c);
		return response({data:5, type:"response"}, c)
	},
	c = (err, data, {type, response} = {}) => {
		console.log("response", data, type);
		return response(7, "response");
	}
function x({data, type, response}) {
	console.log("response", data, type);
	response(1, "response", a);
}
cc.on("request",x);
